<html><!-- Copyright (C) 2007 Laurent A.V. Szyster - Copylef GPL 2.0 -->
<head>
  <title>protocols.js Licence</title>
  <link href="site.css" type="text/css" rel="stylesheet"></link>
  <link href="protocols.css" type="text/css" rel="stylesheet"></link>
</head>
<body>
<div>  
  <h1><a href="index.html">protocols.js</a></h1>
  <div class="menu">
    <a href="documentation.html">Documentation</a>
    <a href="http://code.google.com/p/protocols/source">Sources</a>
  </div>
  <div id="jsonrModelTab">
    <p>
      Use or modify the JSONR pattern below:
    </p>
    <textarea id="jsonrModel" rows="16" cols="72">{
  "number range": 100, 
  "any string": "",
  "regular string": "[a-z]+$",
  "collection": [-10],
  "relation": [true, "[A-Z]+$", 99.99],
  "table": [[true, false, ".+"]],
  "options": {"test": ".+", "again": false}
}</textarea>
    <br />
    <p>
      Then interpret it as an HTML view and a JavaScript controller.
    </p>
    <input type="button" value="interpret &gt;&gt;&gt;" 
        onclick="{jsonrTestInterpret();}"
        />
    <p id="jsonrModelError"></p>
  </div>
  <div id="jsonrViewTab" class="hidden">
    <p>
      Update the JSON object using the generated view and controller:
    </p>
    <div id="jsonrView"></div>
    <p>
      Then serialize it for transfer or go back to your model.
    </p>
    <input type="button" value="&lt;&lt;&lt; modelize" 
        onclick="{jsonrTestModelize();}"
        />
    <input type="button" value="serialize &gt;&gt;&gt;" 
        onclick="{jsonrTestSerialize();}"
        />
  </div>
  <div id="jsonrObjectTab" class="hidden">
    <p>
      Update the JSON string below:
    </p>
    <textarea id="jsonrString" rows="16" cols="72" ></textarea>
    <p>
      And refresh the view with it according to the model.
    </p>
    <input type="button" value="&lt;&lt;&lt; refresh" 
        onclick="{jsonrTestRefresh();}"
        />
    <p id="jsonrObjectError"></p>
  </div>
  <script src="protocols.js" type="text/javascript"></script>
  <script src="jsonr.js" type="text/javascript"></script>
  <script src="jsonrTest.js" type="text/javascript"></script>
</body>
</html>